<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	request.setAttribute("path", path);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>印章管理系统</title>

<link rel="shortcut icon"
	href="<%=request.getContextPath()%>/style_cp/img/icon.png"
	type="image/vnd.microsoft.icon"></link>
<link rel="icon"
	href="<%=request.getContextPath()%>/style_cp/img/icon.png"
	type="image/vnd.microsoft.icon"></link>
<script type="text/javascript"
	src="<%=path%>/style_cp/js/jquery-1.8.2.min.js"></script>
<link rel="stylesheet" rev="stylesheet" type="text/css"
	media="screen, projection" href="<%=path%>/style_cp/css/master.css" />
<style type="text/css">
* {
	font-family: Tahoma, 微软雅黑, 宋体, Arial, Helvetica, sans-serif;
}

html {
	height: 100%;
	border: 0;
	border-right: 1px #fff solid;
}

body {
	margin: 0;
	padding: 0;
	position: relative;
	width: 100%;
	background: #EFEFEF url(<%=path%>/style_cp/img/login_r3_c1.jpg) repeat-x
		left center;
	min-height: 100%; /* For Modern Browsers */
	height: auto !important; /* For Modern Browsers */
	height: 100%; /* For IE */
}

#middle {
	margin: 200px;
	vertical-align: middle;
	position: absolute;
	top: 50%;
	margin-top: -220px;
	width: 874px;
	height: 496px;
	left: 50%;
	margin-left: -437px;
	text-align: left;
}

#middle input {
	font-size: 14px;
	padding: 2px;
	border: 1px solid #233974;
	line-height: 14px;
}

#middle {
	color: #FFFFFF;
}

#middle a {
	color: #FFFFFF;
}
</style>
<script type="text/javascript">
	var login_type="指纹";
	//olo();
	function refushimage(){
		document.form1.myimage.src="<%=path%>/image.jsp?"
				+ Math.floor(990 * Math.random() + 10);
	}
	function asubmit() {
		if (login_type == "指纹") {
			var finger = getFingInfo();
			//alert(finger);
			$("input[name='pwd']").val(finger);
		}
		document.getElementById("form1").submit();
	}
	function ksubmit() {
		if (event.keyCode == 13) {
			asubmit();
		}
	}
	function reset() {
		document.form1.reset();
	}

	$(function() {
		$("input[name='login_type']").bind("change", function() {
			login_type = $(this).val();
			logintypechange($(this).val());
		});
		$("#pwdblock").css("display", "none");
		$(document).bind("keypress", function(event) {
			if (event.keyCode == 13) {
				asubmit();
			}
		});
	});

	//选择登录方式
	function logintypechange(type) {
		if (type == "指纹") {
			$("#yong").text("BoEing：");
			$("#pwdblock").css("display", "none");
		} else {
			$("#yong").text("用户名：");
			$("#pwdblock").css("display", "");
		}

	}

	//读取指纹信息
	function getFingInfo() {

		var ABC_FingerReaderActiveXCtl = document
				.getElementById("ABC_FingerReaderActiveXCtl");
		var fingerFeature = ABC_FingerReaderActiveXCtl.Func_GetFingerFeature();
		if (fingerFeature == "-1") {
			alert("获取指纹特征失败！");
			return;
		}
		var productInfo = ABC_FingerReaderActiveXCtl.Func_GetProductInfo();
		if (productInfo == "-1") {
			alert("获取硬件设备信息失败！");
			return;
		}else{
			$("input[name='product_info']").val(productInfo);
		}
		return fingerFeature;
	}
</script>
</head>
<object classid="CLSID:1C46791B-9C87-4497-8662-EC3C6AE931B9"
	codebase="<%=path%>/style_lib/finger.cab"
	id="ABC_FingerReaderActiveXCtl" height=0 width=0> </object>

<body id="" style="overflow-y: hidden;">
	<jsp:include page="/WEB-INF/jsp_lib/tip.jsp" />
	<div style="background-color:#fff;margin:10px;">
		<form name="form1" id="form1" method="post" action="<%=path%>/login.htm">
			<input name="product_info" value="" type="hidden" /> 
			<div id=""></div>
			<div id="middle">
				<table width="874" border="0" cellspacing="0" cellpadding="0"
					height="456">
					<tr>
						<td background="<%=path%>/style_cp/img/main.jpg"><p>&nbsp;</p>
							<p>&nbsp;</p>
							<p>&nbsp;</p>
							<p>&nbsp;</p>
							<table width="874" border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td width="150">&nbsp;</td>
									<td width="300">
										<p>&nbsp;</p>
										<p>&nbsp;</p>
										<table style="margin-left: 200px;" width="100%" border="0"
											cellpadding="0" cellspacing="0">
											<tr>
												<td width="70" height="40"><label><font
														size="3px">登录方式:</font></label></td>
												<td colspan="3">
												<input type="radio" name="login_type"datatype="Require" value="指纹" checked="checked" /><font size="3px">指纹</font>
												<input type="radio" name="login_type" datatype="Require" value="密码" /><font size="3px">密码</font> 
												
												</td>
											</tr>
											<tr>
												<td width="70" height="40"><font size="3px" id="yong">BoEing：</font></td>
												<td colspan="3"><input type="text" name="code" value=""
													style="width:160px;" autofocus="autofocus"
													datatype="Require" msg="请输入用户名" /></td>
											</tr>
											<tr id="pwdblock">
												<td height="40"><font size="3px">密&nbsp;&nbsp;&nbsp;码:</font>
												</td>
												<td colspan="3"><input type="password" name="pwd"
													id="password" value="" style="width:160px"
													datatype="Require" msg="请输入密码" onkeypress="ksubmit()" /></td>
											</tr>
											<tr>
												<td>&nbsp;</td>
												<td colspan="3"><a href="javascript:asubmit();"><img
														src="<%=path%>/style_cp/img/login.png" alt="" width="107"
														height="37" style="position:relative;top:12px;" /></a></td>
											</tr>
											<tr>
												<td colspan="4">&nbsp; <br /></td>
											</tr>
											<tr>
												<td colspan="4">&nbsp; <br /></td>
											</tr>
											<tr>
												<td>&nbsp;</td>
												<td colspan="3"><a href="${path}/client/seal.zip">下载客户端</a></td>
											</tr>
										</table>
									</td>
									<td>&nbsp;</td>
								</tr>
							</table></td>
					</tr>
				</table>
				<table width="874" border="0" cellspacing="0" cellpadding="0"
					height="40" style="font-size:12px; color:#fff;line-height:40px;">
					<tr>
						<td align="center">&copy; 2011 慧升科技有限公司</td>
					</tr>
				</table>
			</div>
		</form>
	</div>
</body>
</html>
